<?php if (!defined('THINK_PATH')) exit();?><!-- 更新 -->
<link rel="stylesheet" type="text/css" href="/Public/Admin/Style/common.css" />
<div class="pageContent">
    <form method="post" action="/Admin/Contact/update" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone)" > 
        <?php if($dataInfo|count > 0): ?><div class="pageFormContent" layoutH="68">
			<div class="unit">
                <label>公司名称:</label>
				<input type="text" name="company_name" value="<?php echo ($dataInfo['company_name']); ?>" class="required" />
                <input type="hidden" name="id" value="<?php echo ($dataInfo['id']); ?>" />
            </div>
			<div class="unit">
                <label>公司地址:</label>
				<input type="text" name="company_address" value="<?php echo ($dataInfo['company_address']); ?>" class="required" />
            </div>
			<div class="unit">
                <label>联系电话:</label>
				<input type="text" name="tel" value="<?php echo ($dataInfo['tel']); ?>" class="required" />
            </div>
			<div class="unit">
                <label>企业邮箱:</label>
				<input type="text" name="email" value="<?php echo ($dataInfo['email']); ?>" class="required" />
            </div>
			<div class="unit">
                <label>微信二维码：</label>
                <input type="hidden" name="wechat_img" value="<?php echo ($dataInfo['wechat_img']); ?>"/>
                <input type="file" name="uploadify" id="wechat_img" class="uploadify" />
                <div class="picture oneImage">
                	<?php if($dataInfo['wechat_img'] != ''): ?><img src="<?php echo ($dataInfo['wechat_img']); ?>" height="100" /><?php endif; ?>
                </div>
            </div>
			<div class="unit">
                <label>企业微信二维码：</label>
                <input type="hidden" name="comp_wechat_img" value="<?php echo ($dataInfo['comp_wechat_img']); ?>"/>
                <input type="file" name="uploadify" id="comp_wechat_img" class="uploadify" />
                <div class="picture oneImage">
                	<?php if($dataInfo['comp_wechat_img'] != ''): ?><img src="<?php echo ($dataInfo['comp_wechat_img']); ?>" height="100" /><?php endif; ?>
                </div>
            </div>
        </div>
        <div class="formBar">
            <ul>                     <li>
                        <div class="buttonSave">
                            <div class="buttonSaveContent">
                                <button type="submit">
                            		<i class="iconfont">&#xe644;</i>保存
                                </button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="buttonCancel">
                            <div class="buttonCancelContent">
                                <button type="button" class="close">
                                	<i class="iconfont">&#xe640;</i>取消
                                </button>
                            </div>
                        </div>
                    </li>
            </ul>
        </div><?php endif; ?>
    </form>
</div>
<script type="text/javascript">
    //获取分类子级信息form
    $('.unit').on("change",".cidBox",function(){
        var $this =  $(this);
        var id = $this.val();
        $.post('/Admin/Contact/getLastClass',{id : id},function(data){
            if(data !='0'){
                var str = '<select name="cid" style="width:150px;" class="combox cidBox required" ><option value="">请选择</option>';
                $.each(data,function(i,v){
                    str +='<option value="'+v.id+'">'+v.title+'</option>';
                })
                str +='</select>';
                $this.nextAll('.cidBox').remove();
                $this.after(str);
            }
        },'json');
    })
</script>